this.emit('destroy');
},
- _fadeOpen: function() {
- this._monitorConstraint.index = global.screen.get_current_monitor();
+ _fadeOpen: function(onPrimary) {
+ if (onPrimary)
+ this._monitorConstraint.primary = true;
+ else
+ this._monitorConstraint.index = global.screen.get_current_monitor();
this.state = State.OPENING;
}));
},
- open: function(timestamp) {
+ open: function(timestamp, onPrimary) {
if (this.state == State.OPENED || this.state == State.OPENING)
return true;
if (!this.pushModal(timestamp))
return false;
- this._fadeOpen();
+ this._fadeOpen(onPrimary);
return true;
},
if (symbol == Clutter.KEY_Escape ||
symbol == Clutter.KEY_Return ||
symbol == Clutter.KEY_KP_Enter) {
- this._ensureUnlockDialog();
+ this._ensureUnlockDialog(true);
this._hideLockScreen(true);
return true;
}
// 7 standard scrolls to lift up
if (this._lockScreenScrollCounter > 35) {
- this._ensureUnlockDialog();
+ this._ensureUnlockDialog(false);
this._hideLockScreen(true);
}
_onDragBegin: function() {
Tweener.removeTweens(this._lockScreenGroup);
this._lockScreenState = MessageTray.State.HIDING;
- this._ensureUnlockDialog();
+ this._ensureUnlockDialog(false);
},
_onDragEnd: function(action, actor, eventX, eventY, modifiers) {
this.actor.show();
this._isGreeter = Main.sessionMode.isGreeter;
- this._ensureUnlockDialog();
+ this._ensureUnlockDialog(true);
this._hideLockScreen(false);
},
Main.sessionMode.popMode('lock-screen');
},
- _ensureUnlockDialog: function() {
+ _ensureUnlockDialog: function(onPrimary) {
if (!this._dialog) {
let constructor = Main.sessionMode.unlockDialog;
this._dialog = new constructor(this._lockDialogGroup);
return;
}
+ let time = global.get_current_time();
this._dialog.connect('loaded', Lang.bind(this, function() {
- if (!this._dialog.open()) {
+ if (!this._dialog.open(time, onPrimary)) {
log('Could not open login dialog: failed to acquire grab');
this.unlock();
}